#shengfen是全局变量
shengfen={}
def tianjia(sheng,chengshi):
    global shengfen
    if sheng not in shengfen.keys():
        shengfen[sheng]=chengshi
    else:
        print(sheng='已经存在')
def chazhaochengshi(chengshi):
    for p in shengfen.keys():
        if chengshi in shengfen[p]:
            print(chengshi+'属于'+p+'省')
            return
    print("没有这城市")
tianjia('广东',['广州','深圳'])
tianjia('四川',['成都','内江','乐山'])
tianjia('贵州',['贵阳','六盘水','兴义'])

chazhaochengshi('内江')
